package com.example.liuke.guangguang.untils;

import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

/**
 * Created by liuke on 2018/5/6.
 */

public class openapp {

    public static void startActivityForPackage(Context context, String packName) {
        Intent intent = context.getPackageManager().getLaunchIntentForPackage(packName);
        if (null != intent) {
            context.startActivity(intent);
        } else {
            Toast.makeText(context, "agent终端没有安装", Toast.LENGTH_LONG).show();
        }
    }
}
